<?php
header("content-type:text/html; charset=utf-8");
$servername = "localhost";
$username = "root";
$password = "123";
$dbname = "test";
//mysql_query("set names 'utf8'");
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
// 检测连接	
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
}
$stmt = $conn->prepare("INSERT INTO goods (code,name,introduce,symbol,currentPrice,originalPrice,salenum,deadline,ServiceInfo,mainImg,DetailImg) VALUES (?,?,?,?,?,?,?,?,?,?,?)");
$stmt->bind_param("ssssddiss",$code,$name,$introduce,$symbol,$currentPrice,$originalPrice,$salenum,$deadline,$ServiceInfo,$mainImg,$DetailImg);
$code=$_GET["code"];
$name=$_GET["name"];
$introduce=$_GET["introduce"];
$symbol=$_GET["symbol"];
$currentPrice=$_GET["currentPrice"];
$originalPrice=$_GET["originalPrice"];
$salenum=$_GET["salenum"];
$deadline=$_GET["deadline"];
$ServiceInfo=$_GET["ServiceInfo"];
$mainImg=$_GET["mainImg"]
$DetailImg=$_GET["DetailImag"]
$stmt->execute();
echo "新记录插入成功";
$stmt->close();
$conn->close();
?> 